You are here: Symbol Reference > Dew Namespace > Dew.Math Namespace > Classes > TMtxInt Class > TMtxInt Methods > CopyVec Method > TMtxInt.CopyVec Method ([In] TVecInt, int)
Dew Math for .NET
ContentsIndexHome
PreviousUpNext
TMtxInt.CopyVec Method ([In] TVecInt, int)

Copies values from vector to a matrix.

Syntax
C#
Visual Basic
public TMtxInt CopyVec([In] TVecInt Vec, int NrRows);

Copy all Vec elements to the calling matrix. Set the calling matrix Rows property to NrRows. Set the calling matrix Cols property to Vec.Length div NrRow (Length = Rows*Cols). The calling matrix IntPrecision property is adjusted automatically. An exception is raised if Vec.Length mod NrRows <> 0.

var A: TMtxInt; v: TVecInt; begin CreateIt(A); Create(v); try v.SetIt([1, 0, 2, -1, 5, 1.2]) ; A.CopyVec(v); finally FreeIt(A); FreeIt(v); end; end;
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!